home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / INSTALL < prev    next >
Encoding:
Text File  |  1995-10-30  |  10.9 KB  |  264 lines

  1.                 Installing the SVGATextMode utility
  2.                 -----------------------------------
  3.                 
  4. First thing to do: read the README file. At least you'll know what this
  5. program does.
  6.  
  7. Reading some of the files in the "doc" directory (especially the man files)
  8. might come in useful, too. It contains several files, describing several
  9. aspects of SVGATextMode, like how to use the TextConfig file, how monitor
  10. timings interact with each other (and with the monitor!), etc.
  11.  
  12. You might also consider changing the Makefile, as it holds the path to the
  13. TextConfig file (it is a fixed path, no environment variables yet). Some
  14. people don't like makefiles putting new executables in their system
  15. directories without asking. That is exactly what "make install" will do.
  16. You've been warned!
  17.  
  18.  
  19. Simply typing "make install" should install the files needed for textmode
  20. switching. If this is the first time you install the program, typing "make
  21. newinstall" will also copy the text config file (once installed already, you
  22. don't want to overwrite your old TextConfig, so use "make install" then.
  23.  
  24. This will however NOT install external clock-selection programs or the
  25. font-changing program "setfont", or any fonts. The ones included here (in
  26. the "setfont" directory) are just for the unhappy few who don't have the
  27. "keytbls" package included in the Slackware distribution, or in the
  28. "kbd-0.87.tar.gz" package (or any newer version) which can be found on many
  29. FTP sites.
  30.  
  31.  
  32. Before going on, try the program by following the instructions in the
  33. TextConfig file. It guides you through several modes, starting from standard
  34. modes that should work on ALL cards supported, and gradually using more
  35. special features. That way you'll get a feeling of what can be done with
  36. SVGATextMode.
  37.  
  38. Once you've done that, you might feel compelled to do some experimenting.
  39. Read the TextConfig manual file. It explains the syntax of the config file
  40. in detail.
  41.  
  42. Using "vgaset" (also included in this package) can help you fine-tune text
  43. modes. But read doc/vgaset.note first! It contains vital information on some
  44. versions of vgaset.
  45.  
  46. If anything goes weird, clockprobe and grabmode can tell you what exactly
  47. the hardware is programmed like.
  48.  
  49.  
  50. Font loading
  51. ------------
  52.  
  53. Once you selected a textmode, You might have to change the font in the VGA
  54. card. If you started off from a standard 80x25 VGA resolution, then the VGA
  55. card was loaded with an 8x16 font. But if your new resolution uses an 8x8
  56. font, the characters will be cut off in the middle, and things will be hard
  57. to read.
  58.  
  59. It might then be a wise idea to load another font into the VGA card. A
  60. standard linux utility called "setfont" Is just what you need. If you do not
  61. have it on your system, I have included a SMALL amount of fonts, and the
  62. "setfont" program, just in case. The "Cyr_a8x##" (where ## is a font height)
  63. files are some font files for setfont. The program and the fonts are
  64. available in the "keytbls" package in the Slackware distribution, and of
  65. course "on your favourite FTP site"...
  66.  
  67. You can make SVGATextMode call the font loading program automatically using
  68. the "LoadFont" option. See the TextConfig docs to see how to do that. Once
  69. configured correctly, you can get an entirely new text mode with just one
  70. command ('SVGATextMode' of course ;-). Everything else should be automatic.
  71.  
  72.  
  73. Letting the kernel and the applications know what you've done
  74. -------------------------------------------------------------
  75.  
  76. When you change your textmode resolution on the fly, your (virtual) consoles
  77. have to be made aware of the changes, or they'll continue to think you're
  78. still in the OLD mode (whatever that was). All applications sensitive to
  79. screen width and height, e.g. any full-screen application, will be affected
  80. by this.
  81.  
  82. You could do this by hand (typing "stty rows 37 cols 100" at every
  83. terminal), but it is more convenient to let SVGATextMode do that. 
  84.  
  85. Adding a "Terminals" line to the TextConfig file, e.g.
  86.  
  87.      Terminals tty6 tty5 tty4 tty3 tty2 tty1
  88.      
  89. will tell SVGATextMode it should send resize commands to each of the
  90. terminals mentionned in that line. In this case, virtual terminals 1 to 6
  91. (selected with ALT-F1 to ALT-F6) will be resized. Any application running in
  92. that terminal will be sent a "SIGWINCH" signal, just as it would get under
  93. X-Windows when you resize the Xterm window with the mouse.
  94.  
  95. If that application is aware of that signal (i.e. knows what to do when it
  96. gets one), it will redraw its screen and adopt the new size, without any
  97. interaction from the user.
  98.  
  99. Some common examples are more, less, emacs, joe, gpm etc.
  100.  
  101. If you are running any program that depends on your terminal settings, but
  102. doesn't understand the resizing signal (e.g. selection) there is no other
  103. way than to restart it. Until the author adds support for the SIGWINCH
  104. signal. Or maybe it's already supported by now... 
  105.  
  106. Another thing to consider is the /etc/termcap file, or the terminfo
  107. database. Some applications depend on one of these to perform text-screen
  108. operations. If you define your own fancy text mode, you might have to add an
  109. entry in the termcap file for it. An extra entry is fairly easy to create:
  110. just copy an existing termcap entry, and change all the appropriate numbers
  111. in it to the ones you just created. For terminfo, you're on your own. I
  112. don't know zit about that.
  113.  
  114. * This feature has become obsolete starting with kernel version 1.3.3. The
  115. * kernel now does all this automatically.
  116.  
  117.  
  118. Making your Linux system boot in a new and better text mode automatically
  119. -------------------------------------------------------------------------
  120.  
  121. A simple method would be to put the following in your /etc/rc.d/rc.font
  122. file:
  123.  
  124.    #!/bin/bash
  125.    #
  126.    # This (minimalistic) script changes the VGA textmode.
  127.    # This example is for a 100x37 character mode.
  128.    echo "Changing to 100x37 character console"
  129.    SVGATextMode -r 100x37
  130.  
  131. And if you configured SVGATextMode to do automatic font loading, you won't
  132. even have to call a font loading program yourself. See the TextConfig
  133. documentation if you want to find out how to do that.
  134.  
  135.  
  136. Re-compiling the code
  137. ---------------------
  138.  
  139. To compile SVGATextMode, simply typing "make" should do the job. "make
  140. install" will install SVGATextMode and TextConfig in their designated
  141. places. "make clean" or "make mrproper" will do a little or a lot of
  142. cleaning up.
  143.  
  144. For people wanting to do some more hacking around, I also included some
  145. tools that I used (or didn't use) while developing SVGATextMode. "make hack"
  146. will compile these as well. BUT BE CAREFULL: these programs are even MORE
  147. dangerous than SVGATextMode! Consider them as being "No user servicable
  148. parts"! Only to be used if you know what you're doing, if you like
  149. surprises, or if you're plainly suicidal.
  150.  
  151.  
  152. IMPORTANT NOTE: This program will be severely limited with kernels older
  153. than version 1.1.54, because they lack the "VT_RESIZE" kernel call.
  154. Compiling will also NOT work "out-of-the-box" (for the same reason). That is
  155. a problem, but you need the kernel call to change text resolutions once the
  156. kernel has booted.
  157.  
  158.  
  159. Using and/or Recompiling SVGATextMode for kernels older than 1.1.54
  160. ------------------------------------------------------------
  161.  
  162. It is possible to use (and recompile) SVGATextMode with an older kernel, but
  163. it can then ONLY be used to IMPROVE a text mode, and NOT to CHANGE it. If
  164. you booted in 132x43 for example, you might still use SVGATextMode to
  165. improve it (higher refresh, more detailed font, ...). But it would HAVE to
  166. remain at 132x43, but now with a 16-pixel font instead of just 8, and at 100
  167. Hz instead of 60 Hz (just an example).
  168.  
  169. If you try using the included SVGATextMode binary on "older" kernels, and
  170. try to resize the screen, it will issue an error, stating that resizing is
  171. not possible on pre-1.1.54 kernels.
  172.  
  173. In order to recompile SVGATextMode with older kernels installed (= pre
  174. 1.1.54), you must add the `NO_RESIZE' flag to the `CONF_FLAGS' in the
  175. Makefile.
  176.  
  177. From then on, SVGATextMode will simply not allow screen resizing in ANY
  178. case.
  179.  
  180. It is however NOT necessary to recompile SVGATextMode when you have an older
  181. kernel: it will auto-detect that, and simply not allow you to resize your
  182. screen.
  183.  
  184. If you use the precompiled version of SVGATextMode, WITH the VT_RESIZE support
  185. in it, SVGATextMode will check for the currently used kernel version, and
  186. allow or disallow screen resizing appropriately.
  187.  
  188.  
  189. Compiling SVGATextMode for DOS
  190. ------------------------------
  191.  
  192. You're mad.
  193.  
  194. No, seriously, it can be done. Here's how.
  195.  
  196. required stuff:
  197.      * gzip.exe
  198.      * tar.exe
  199.      * a DPMI provider (A DMPI environment can  be found  in  MS-Windows
  200.        (DOS boxes), OS/2, Windows-NT, qdpmi, 386max, etc. A free DMPI
  201.        program is included in the distribution (The DJGPP DPMI program
  202.        CWSDPMI)
  203.      * DJGPP 2.0 or newer.
  204.  
  205.  - copy the .tar.gz distribution to your DOS drive. You will have to rename
  206.    it, e.g. to "stm.tgz"
  207.    
  208.  - `gzip -d stm.tgz' will uncompress the tar file. You obviously need the
  209.    DOS gzip for that.
  210.    
  211.  - `tar xvf stm.tar' will then untar the stuff, and rename all long
  212.    filenames to something DOS can handle. You will need a DOS tar for that.
  213.    
  214.  - change the Makefile and add `-DDOS' to the `CONF_FLAGS' variable.
  215.  
  216.  - now typing `make DOS' should do the trick. 
  217.  
  218.  If all goes well, you'll get an stm.exe, grabmode.exe from the compilation.
  219.  clockprobe.exe is just a copy of grabmode.exe.
  220.  
  221.  The default textconfig file should be placed in \etc\textconf.
  222.  
  223.  You need the DPMI environment to run the programs as well (you already
  224.  needed it for the DJGPP compiler).
  225.  
  226.  
  227. Hacking a bit yourself
  228. ----------------------
  229.  
  230. If you feel like hacking some VGA registers yourself, a small utility is
  231. included that was used to test many VGA features. It is undocumented, and
  232. should be considered "not suitable for normal use". It helped me test VGA
  233. stuff without needing to recompile all the time.
  234.  
  235. It is far from complete, but useful for THIS application.
  236.  
  237. You can make it by typing "make hack". You'll get "setVGAreg" and
  238. "getVGAreg" (a link to setVGAreg). Enjoy.
  239.  
  240. -----------------------------------------------------------------------------
  241.  
  242. Changing the code
  243. -----------------
  244.  
  245. Since the author (=me) is NOT an experienced C-programmer at all, it is very
  246. possible that the code can be optimised, enhanced, robustified, etc. in may
  247. ways. Any useful remarks on that will be very welcome and most probably
  248. instructive... And if the code looks like SOLDERED together rather than
  249. PROGRAMMED, you'll know what my REAL roots are...
  250.  
  251. Adding support for other chipsets SHOULD be fairly easy. The most important
  252. things are chipset-specific pixel-clock selection routines, and
  253. chipset-specific register unlocking routines.
  254.  
  255. If anyone feels temped to do so, or if you don't feel tempted, but have the
  256. piece of code at hand, or (even better) you have data sheets on that
  257. chipset, please let me know.
  258.  
  259. If you change the code to improve the program (there is no use in changing
  260. the code to make it WORSE, except if you work for Bill ;-), please send
  261. patches, so I can include the changes in future versions.
  262.  
  263.  
  264.